<?= view("home.common.header") ?>
    <div class="container-fluid">
        <div class="row">
            <div class="col-xs-12 col-sm-12 bottom-line">
                <i class="glyphicon glyphicon-chevron-right jt"></i><span class="headfont">修改代付人</span>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12 col-sm-12">
                <input class="form-control" name="payphone" type="text" value="" placeholder="--请输入代付人电话号码--">
                <div><a class="evePay btn btn-primary form-control mtop15 eveDpay" onclick='return false;' href="<?=url('home/person/editorder')?>">找他（她）代付</a></div>
            </div>
        </div>
    </div>
<script>
    $('.eveDpay').click(function(){
        var reg = /^1[3587]\d{9}$/;
        if ($('input[name=payphone]').val() == '' || !reg.test($('input[name=payphone]').val())) {
               alert('请填写正确的联系人电话');
               $('input[name=payphone]').focus();
               return false;
        }
        var url = $(this).attr('href');
        data = {'payphone': $('input[name=payphone]').val(), 'order':'<?=$result->order?>'};
        $.get(url, data, function(data) {
            layer.open({
                content: data.info,
                style: 'background-color:#3E403E; color:#fff; border:none;',
                time: 1
            });
            setTimeout(function(){
                window.location.href="<?=url("home/person/myorder") ?>";
            },1000);
        });
        return false;
    });
</script>
<?= view("home.common.footer") ?>
